package me.softwareengineer.guice.rendering.listener;

import java.util.Map;

import me.softwareengineer.guice.rendering.domain.HasMetaData;
import me.softwareengineer.guice.rendering.domain.HasProperties;

/**
 * An Event represents a runtime event occurred in the rendering process. All
 * events should extends this class.
 * 
 * @author yadtahir
 * @since 1.0
 */

//TODO add properties and create a new metadata
public class Event {
	
	/**
	 * Holds the metadata of the element
	 */
	private Map<String, Object> metadata;
	
	/**
	 * Holds the properties of the element
	 */
	private Map<String, String> properties;
	
	/**
	 * Constructs an event with the passed properties
	 * @param properties the properties of the element. For more info, check {@link HasProperties}
	 */
	public Event(Map<String, String> properties, Map<String, Object> metadata) {
		this.properties = properties;
		this.metadata = metadata;
	}

	/**
	 * 
	 * @return the properties of the element. For more information, see
	 *         {@link HasProperties}
	 */
	public Map<String, String> getProperties() {
		return this.properties;
	}
	
	/**
	 * 
	 * @return the metadata of the element. For more information, check {@link HasMetaData}
	 */
	public Map<String, Object> getMetadata(){
		return metadata;
	
	}
}
